<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <title>业务管理系统-系统管理-用户管理</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link rel="stylesheet" href="/css/style.css" />
    <link rel="stylesheet" href="/css/iconfont.css" />
    <link rel="stylesheet" href="/css/element-icons.css" />
    <link rel="stylesheet" href="/css/newiconfont.css" />
    <script src="/js/jquery.min.js"></script>
    <script src="/js/lib.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!--[if IE]>
    <link rel="stylesheet" href="/css/all-ie-only.css" />
    <![endif]-->
</head>

<body>
<div class="header">
    <a href="javascript:;" class="header-logo">
        <img src="/images/logo.png" alt="" />
    </a>
    <div class="header-nav">
        <ul class="fix">
            <li>
                <a href="javascript:;" class="v1">标识注册系统</a>
            </li>
            <li>
                <a href="javascript:;" class="v1">标识解析系统</a>
            </li>
            <li>
                <a href="javascript:;" class="v1">统一认证系统</a>
            </li>
            <li>
                <a href="javascript:;" class="v1">运行检测系统</a>
            </li>
            <li>
                <a href="javascript:;" class="v1">区块链浏览器</a>
            </li>
            <li>
                <a href="javascript:;" class="v1">链网展示系统</a>
            </li>
        </ul>
    </div>
    <div class="header-user">
        <a href="javascript:;" class="hd">
            <img src="/images/head.png" alt="" />
            <span>管理员</span>
        </a>
        <div class="dropdown-menu">
            <div class="icon-arrow"></div>
            <ul>
                <li class="wrz">
                    <a href="javascript:;" class="con">
                        <span>未认证</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" class="con">
                        <span>首页</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" class="con">
                        <span>资料编辑</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" class="con">
                        <span>我的钱包</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" class="con">
                        <span>退出</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="block-contail">
    <!-- 布局-侧边 -->
    <div class="block-left">
        <div class="block-scrollbar">
            <!-- 收起、展开按钮 -->
            <div class="arrow-btn">
                <span class="el-icon-arrow-left"></span>
            </div>
            <!-- 收起、展开按钮 end -->
            <!-- 侧边导航 -->
            <ul class="slide-nav">
                <li>
                    <a href="javascript:;" class="v1">
                        <i class="icon_dn icon newiconfont newicon1-guganlianguanli"></i>
                        <span class="title">骨干链管理</span>
                        <i class="icon-arrow el-icon-arrow-down"></i>
                    </a>
                    <div class="slide-nav-subitem">
                        <ul>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">基础配置</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">节点管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">合约管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">用户管理</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="javascript:;" class="v1">
                        <i class="icon_dn icon newiconfont newicon2-zilianguanli"></i>
                        <span class="title">子链管理</span>
                        <i class="icon-arrow el-icon-arrow-down"></i>
                    </a>
                    <div class="slide-nav-subitem">
                        <ul>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">子链申报管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">子链区块头</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">子链节点管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">子链用户管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">子链合约管理</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="javascript:;" class="v1">
                        <i class="icon_dn icon newiconfont newicon3-renzhengzhongxin"></i>
                        <span class="title">认证中心</span>
                        <i class="icon-arrow el-icon-arrow-down"></i>
                    </a>
                    <div class="slide-nav-subitem">
                        <ul>
                            <li>
                                <a href="/manage/authentication/certificateperson.html" class="v2">
                                    <span class="title">个人认证</span>
                                </a>
                            </li>
                            <li>
                                <a href="/manage/authentication/certificatecorp.html" class="v2">
                                    <span class="title">企业认证</span>
                                </a>
                            </li>
                            <li>
                                <a href="/manage/authentication/certificatenode.html" class="v2">
                                    <span class="title">节点认证</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="javascript:;" class="v1">
                        <i class="icon_dn icon newiconfont newicon6-quanxianguanli"></i>
                        <span class="title">权限管理</span>
                        <i class="icon-arrow el-icon-arrow-down"></i>
                    </a>
                    <div class="slide-nav-subitem">
                        <ul>
                            <li>
                                <a href="/manage/role/index.html" class="v2">
                                    <span class="title">角色管理</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="javascript:;" class="v1">
                        <i class="icon_dn icon iconfont iconicon_setting"></i>
                        <span class="title">系统管理</span>
                        <i class="icon-arrow el-icon-arrow-down"></i>
                    </a>
                    <div class="slide-nav-subitem">
                        <ul>
                            <li>
                                <a href="javascript:;" class="v2">
                                    <span class="title">用户管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="/manage/system/dictbiz.html" class="v2">
                                    <span class="title">系统字典</span>
                                </a>
                            </li>
                            <li>
                                <a href="/manage/system/dictbiz.html" class="v2">
                                    <span class="title">业务字典</span>
                                </a>
                            </li>
                            <li>
                                <a href="/manage/system/menu.html" class="v2">
                                    <span class="title">菜单管理</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </li>
            </ul>
            <!-- 侧边导航 end -->
        </div>
    </div>
    <!-- 布局-侧边 end -->
    <!-- 布局-主内容 -->
    <div class="block-main">
        <div class="block-scrollbar">
            <!-- 主内容 -->
            <div class="block-3">
                <div class="block3-cont">
                    <div class="system-box1">
                        <div class="col-l">
                            <div class="basic-slide">
                                <input id="filter_bladeUser" type="text" class="input-inner" placeholder="输入关键字进行过滤" />
                                <div class="tree-ul js_tree">
                                    <ul id="bladeUser"></ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-r">
                            <div class="block2-cont">
                                <div class="box-set5">
                                    <div class="set-bd2">
                                        <div class="set-item col-3">
                                            <div class="tit">登录账号:</div>
                                            <div class="con">
                                                <input id="account" type="text" class="input-inner" placeholder="登录账号">
                                            </div>
                                        </div>
                                        <div class="set-item col-3">
                                            <div class="tit">用户姓名:</div>
                                            <div class="con">
                                                <input id="realName" type="text" class="input-inner" placeholder="用户姓名">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="set-bt set-bt_r">
                                        <a id="search" href="javascript:;" class="primary-btn">
                                            <i class="icon_dn el-icon-search"></i>
                                            <span>搜索</span>
                                        </a>
                                        <a id="reset" href="javascript:;">
                                            <i class="icon_dn el-icon-delete"></i>
                                            <span>清空</span>
                                        </a>
                                    </div>
                                </div>
                                <div class="box-set6">
                                    <div class="set-bt3">
                                        <div class="item" id="refresh">
                                            <a href="javascript:;" class="btn">
                                                <i class="el-icon-refresh"></i>
                                            </a>
                                            <div class="mask">
                                                <div class="popper__arrow"></div>
                                                <div class="tit">刷新</div>
                                            </div>
                                        </div>
                                        <div class="item myfancy" data-href="#pop-xianyin">
                                            <a href="javascript:;" class="btn">
                                                <i class="el-icon-s-operation"></i>
                                            </a>
                                            <div class="mask">
                                                <div class="popper__arrow"></div>
                                                <div class="tit">显隐</div>
                                            </div>
                                        </div>
                                        <div class="item js_search_show_hide">
                                            <a href="javascript:;" class="btn">
                                                <i class="el-icon-search"></i>
                                            </a>
                                            <div class="mask">
                                                <div class="popper__arrow"></div>
                                                <div class="tit">搜索</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="set-bt">
                                        <a href="javascript:;" class="role-btn">
                                            <i class="icon_dn el-icon-user"></i>
                                            <span>角色配置</span>
                                        </a>
                                    </div>
                                </div>
                                <div class="data-content_2 table-scroll-x table-scroll-y js-custom-radio-checkbox" data-modulename="formrel01">
                                    <div class="table1-head table-6">
                                        <table>
                                            <colgroup>
                                                <col width="50">
                                                <col width="50">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="240">
                                            </colgroup>
                                            <thead>
                                            <tr>
                                                <th class="table1_hidden">
                                                    <div class="checkbox-item">
                                                        <label>
                                                            <input type="checkbox" name="1">
                                                        </label>
                                                    </div>
                                                </th>
                                                <th class="table1_hidden">#</th>
                                                <th>登录账号1</th>
                                                <th>所属租户</th>
                                                <th>用户姓名</th>
                                                <th>所属角色</th>
                                                <th>所属部门</th>
                                                <th class="table1_hidden table1_center">操作</th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                    <div class="table1-body table-6">
                                        <table>
                                            <colgroup>
                                                <col width="50">
                                                <col width="50">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="NaN">
                                                <col width="240">
                                            </colgroup>
                                            <tbody id="userTbody"></tbody>
                                        </table>
                                    </div>
                                    <div class="table1-left_fixed" style="width: 100px;">
                                        <div class="table1-head_fixed table-6">
                                            <table>
                                                <colgroup>
                                                    <col width="50">
                                                    <col width="50">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="240">
                                                </colgroup>
                                                <thead>
                                                <tr>
                                                    <th>
                                                        <div class="checkbox-item">
                                                            <label>
                                                                <input type="checkbox" name="allCheckbox" onclick="selectAll()">
                                                            </label>
                                                        </div>
                                                    </th>
                                                    <th>#</th>
                                                    <th class="table1_hidden">登录账号1</th>
                                                    <th class="table1_hidden">所属租户</th>
                                                    <th class="table1_hidden">用户姓名</th>
                                                    <th class="table1_hidden">所属角色</th>
                                                    <th class="table1_hidden">所属部门</th>
                                                    <th class="table1_hidden table1_center">操作</th>
                                                </tr>
                                                </thead>
                                            </table>
                                        </div>
                                        <div class="table1-body_fixed table-6">
                                            <table>
                                                <colgroup>
                                                    <col width="50">
                                                    <col width="50">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="240">
                                                </colgroup>
                                                <tbody id="userTbody_left"></tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="table1-right_fixed" style="width: 240px;">
                                        <div class="table1-head_fixed table-6">
                                            <table>
                                                <colgroup>
                                                    <col width="50">
                                                    <col width="50">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="240">
                                                </colgroup>
                                                <thead>
                                                <tr>
                                                    <th class="table1_hidden">
                                                        <div class="checkbox-item">
                                                            <label>
                                                                <input type="checkbox" name="1">
                                                            </label>
                                                        </div>
                                                    </th>
                                                    <th class="table1_hidden">#</th>
                                                    <th class="table1_hidden">登录账号1</th>
                                                    <th class="table1_hidden">所属租户</th>
                                                    <th class="table1_hidden">用户姓名</th>
                                                    <th class="table1_hidden">所属角色</th>
                                                    <th class="table1_hidden">所属部门</th>
                                                    <th class="table1_center">操作</th>
                                                </tr>
                                                </thead>
                                            </table>
                                        </div>
                                        <div class="table1-body_fixed table-6">
                                            <table>
                                                <colgroup>
                                                    <col width="50">
                                                    <col width="50">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="NaN">
                                                    <col width="240">
                                                </colgroup>
                                                <tbody id="userTbody_right"></tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div id="pageable" class="pages">
                                    <div id="total" class="pages-total"></div>
                                    <div class="dropmenurel01 js-dropmenu" data-modulename="dropmenurel01">
                                        <input type="hidden" value="0">
                                        <div class="dropmenurel01-tit">
                                            <span>请选择</span>
                                            <i class="el-input__icon el-icon-arrow-up"></i>
                                        </div>
                                        <div class="dropmenurel01-options js-dropmenu-options">
                                            <i class="popper__arrow"></i>
                                            <ul>
                                                <li data-value="1" onclick="changePageSize(10)">10条/页</li>
                                                <li data-value="2" onclick="changePageSize(20)">20条/页</li>
                                                <li data-value="3" onclick="changePageSize(30)">30条/页</li>
                                                <li data-value="4" onclick="changePageSize(40)">40条/页</li>
                                                <li data-value="5" onclick="changePageSize(50)">50条/页</li>
                                                <li data-value="6" onclick="changePageSize(100)">100条/页</li>
                                            </ul>
                                        </div>
                                    </div>
                                    <ul id="pageList"></ul>
                                    <div class="pages-go">
                                        前往
                                        <input type="number" value="1" class="input-inner" id="pageNum" onChange="jumpPage()"/>
                                        页
                                        <div class="pages-prev pages-disable"><a href="javascript:;"><i class="el-icon el-icon-arrow-left"></i></a></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 用户角色配置 -->
            <div class="m-pop" id="pop-yonghujuese">
                <div class="win-pop5">
                    <div class="win1-hd">
                        <div class="win1-btn">
                            <a href="javascript:;" class="close js-close">
                                <i class="el-dialog__close el-icon el-icon-close"></i>
                            </a>
                        </div>
                        <h3>用户角色配置</h3>
                    </div>
                    <div class="win1-bd">
                        <div class="tree-ul js_tree js-custom-radio-checkbox" data-modulename="formrel01">
                            <ul id="roleTree"></ul>
                        </div>
                    </div>
                    <div class="win-bt2">
                        <a href="javascript:;" class="js-btn"><span>取消</span></a>
                        <a href="javascript:;" class="primary-btn" onclick="submitGrant()"><span>确定</span></a>
                    </div>
                </div>
            </div>
            <!-- 用户角色配置 end -->
            <!-- 用户管理-查看 -->
            <div class="m-pop" id="pop-yonghuguanlichakan">
                <div class="win-pop6">
                    <div class="win1-hd">
                        <div class="win1-btn">
                            <a href="javascript:;" class="close js-close">
                                <i class="el-dialog__close el-icon el-icon-close"></i>
                            </a>
                        </div>
                        <h3>查 看</h3>
                    </div>
                    <div class="win-yhck">
                        <div class="yhck-items">
                            <div class="yhck-title">
                                <i class="icon_dn el-icon-user-solid"></i>
                                <h4>基础信息</h4>
                            </div>
                            <div class="yhck-content">
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>登录账号:</div>
                                    <div class="con">
                                        <input id="account_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 登录账号" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>所属租户:</div>
                                    <div class="con">
                                        <div class="dropmenurel01 dropmenurel01_disabled  js-dropmenu" data-modulename="dropmenurel01">
                                            <input type="hidden" id="tenantId_view" value="0">
                                            <div class="dropmenurel01-tit">
                                                <span id="tenantName_view">选择所属租户</span>
                                                <i class="el-input__icon el-icon-arrow-up"></i>
                                            </div>
                                            <div class="dropmenurel01-options js-dropmenu-options">
                                                <i class="popper__arrow"></i>
                                                <ul id="tenantSelect">
                                                    <div class="input">
                                                        <input type="text" class="input-inner" placeholder="输入关键字进行过滤">
                                                    </div>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="yhck-items">
                            <div class="yhck-title">
                                <i class="icon_dn el-icon-s-order"></i>
                                <h4>详细信息</h4>
                            </div>
                            <div class="yhck-content">
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>用户昵称:</div>
                                    <div class="con">
                                        <input id="name_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 用户昵称" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>用户姓名:</div>
                                    <div class="con">
                                        <input id="realName_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 用户姓名" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">手机号码:</div>
                                    <div class="con">
                                        <input id="mobile_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 手机号码" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">电子邮箱:</div>
                                    <div class="con">
                                        <input id="email_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 电子邮箱" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>用户性别:</div>
                                    <div class="con">
                                        <div class="dropmenurel01 dropmenurel01_disabled  js-dropmenu" data-modulename="dropmenurel01">
                                            <input type="hidden" id="sex_view" value="0">
                                            <div class="dropmenurel01-tit">
                                                <span id="sexName_view">选择用户性别</span>
                                                <i class="el-input__icon el-icon-arrow-up"></i>
                                            </div>
                                            <div class="dropmenurel01-options js-dropmenu-options">
                                                <i class="popper__arrow"></i>
                                                <ul>
                                                    <li data-value="1">男</li>
                                                    <li data-value="2">女</li>
                                                    <li data-value="-1">未知</li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">用户生日:</div>
                                    <div class="con">
                                        <i class="el-icon-date"></i>
                                        <input id="birthday_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 用户生日" class="input-inner">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="yhck-items">
                            <div class="yhck-title">
                                <i class="icon_dn el-icon-s-custom"></i>
                                <h4>职责信息</h4>
                            </div>
                            <div class="yhck-content">
                                <div class="yhck-item col-2">
                                    <div class="tit">用户编号:</div>
                                    <div class="con">
                                        <input id="code_view" type="text" disabled="disabled" autocomplete="off" placeholder="请输入 用户编号" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>所属角色:</div>
                                    <div class="con">
                                        <div class="dropmenurel01 dropmenurel01_disabled  js-dropmenu2" data-modulename="dropmenurel01">
                                            <input type="hidden" id="roleId_view">
                                            <div class="dropmenurel01-tit">
                                                <span id="roleName_view">选择所属角色</span>
                                                <i class="el-input__icon el-icon-arrow-up"></i>
                                            </div>
                                            <div class="dropmenurel01-options js-dropmenu-options2">
                                                <i class="popper__arrow"></i>
                                                <ul>
                                                    <div class="input">
                                                        <input type="text" class="input-inner" placeholder="输入关键字进行过滤">
                                                    </div>
                                                    <div class="tree-ul js_tree js-custom-radio-checkbox" data-modulename="formrel01">
                                                        <ul id="roleTree_view"></ul>
                                                    </div>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">所属部门:</div>
                                    <div class="con">
                                        <div class="dropmenurel01 dropmenurel01_disabled  js-dropmenu2" data-modulename="dropmenurel01">
                                            <input id="depotId_view" type="hidden" value="0">
                                            <div class="dropmenurel01-tit">
                                                <span id="depotName_view">选择所属部门</span>
                                                <i class="el-input__icon el-icon-arrow-up"></i>
                                            </div>
                                            <div class="dropmenurel01-options js-dropmenu-options2">
                                                <i class="popper__arrow"></i>
                                                <ul>
                                                    <div class="input">
                                                        <input type="text" class="input-inner" placeholder="输入关键字进行过滤">
                                                    </div>
                                                    <div class="tree-ul js_tree js-custom-radio-checkbox" data-modulename="formrel01">
                                                        <ul id="postTree"></ul>
                                                    </div>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">所属岗位:</div>
                                    <div class="con">
                                        <div class="dropmenurel01 dropmenurel01_disabled  js-dropmenu2" data-modulename="dropmenurel01">
                                            <input id="postId_view" type="hidden" value="0">
                                            <div class="dropmenurel01-tit">
                                                <span id="postName_view">选择所属岗位</span>
                                                <i class="el-input__icon el-icon-arrow-up"></i>
                                            </div>
                                            <div class="dropmenurel01-options js-dropmenu-options2">
                                                <i class="popper__arrow"></i>
                                                <ul>
                                                    <div class="input">
                                                        <input type="text" class="input-inner" placeholder="输入关键字进行过滤">
                                                    </div>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 用户管理-查看 end -->
            <div class="m-pop" id="pop-yonghuguanlibianji">
                <div class="win-pop6">
                    <div class="win1-hd">
                        <div class="win1-btn">
                            <a href="javascript:;" class="close js-close">
                                <i class="el-dialog__close el-icon el-icon-close"></i>
                            </a>
                        </div>
                        <h3>编 辑</h3>
                    </div>
                    <div class="win-yhck">
                        <div class="yhck-items">
                            <div class="yhck-title">
                                <i class="icon_dn el-icon-user-solid"></i>
                                <h4>基础信息</h4>
                            </div>
                            <div class="yhck-content">
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>登录账号:</div>
                                    <div class="con">
                                        <input id="account_edit" type="text" placeholder="请输入 登录账号" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>所属租户:</div>
                                    <div class="con">
                                        <select id="tenantId_edit"></select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="yhck-items">
                            <div class="yhck-title">
                                <i class="icon_dn el-icon-s-order"></i>
                                <h4>详细信息</h4>
                            </div>
                            <div class="yhck-content">
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>用户昵称:</div>
                                    <div class="con">
                                        <input id="name_edit" type="text" placeholder="请输入 用户昵称" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>用户姓名:</div>
                                    <div class="con">
                                        <input id="realName_edit" type="text" placeholder="请输入 用户姓名" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">手机号码:</div>
                                    <div class="con">
                                        <input id="mobile_edit" type="text" placeholder="请输入 手机号码" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">电子邮箱:</div>
                                    <div class="con">
                                        <input id="email_edit" type="text" placeholder="请输入 电子邮箱" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>用户性别:</div>
                                    <div class="con">
                                        <select id="sex_edit">
                                            <option value="1">男</option>
                                            <option value="2">女</option>
                                            <option value="-1">未知</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">用户生日:</div>
                                    <div class="con">
                                        <i class="el-icon-date"></i>
                                        <input id="birthday_edit" type="text"  placeholder="请输入 用户生日" class="input-inner">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="yhck-items">
                            <div class="yhck-title">
                                <i class="icon_dn el-icon-s-custom"></i>
                                <h4>职责信息</h4>
                            </div>
                            <div class="yhck-content">
                                <div class="yhck-item col-2">
                                    <div class="tit">用户编号:</div>
                                    <div class="con">
                                        <input id="code_edit" type="text" placeholder="请输入 用户编号" class="input-inner">
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit"><span>*</span>所属角色:</div>
                                    <div class="con">
                                        <select id="roleId_edit"></select>
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">所属部门:</div>
                                    <div class="con">
                                        <input id="deptId_edit" type="hidden">
                                        <input id="deptName_edit" type="text" class="input-inner" placeholder="请选择所属部门" value="" readonly onclick="initDeptTree('edit');">
                                        <ul id="ztreeDiv_edit" class="ztree" style="display: none;"></ul>
                                    </div>
                                </div>
                                <div class="yhck-item col-2">
                                    <div class="tit">所属岗位:</div>
                                    <div class="con">
                                        <select id="postId_edit"></select>
                                    </div>
                                </div>
                            </div>
                            <div class="win-bt2">
                                <a href="javascript:;" class="primary-btn" onclick="submitForm('edit')"><span><i
                                        class="el-icon-circle-check"></i>修改</span></a>
                                <a href="javascript:;" class="js-btn"><span><i
                                        class="el-icon-circle-close"></i>取消</span></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 布局-主内容 end -->
</div>
<div class="pop-bg"></div>
<!-- 合约禁用弹窗 -->
<div class="m-pop" id="pop-heyuejinyong">
    <div class="win-pop1">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>合约禁用</h3>
        </div>
        <div class="win1-bd">
            <div class="win1-item">
                <div class="tit">禁用原因<span>*</span></div>
                <div class="con">
                    <input type="text" class="input-inner" />
                </div>
            </div>
        </div>
        <div class="win-bt">
            <a href="javascript:;" class="js-btn"><span>取 消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确 定</span></a>
        </div>
    </div>
</div>
<!-- 合约禁用弹窗 end -->
<!-- 撤销弹窗 -->
<div class="m-pop" id="pop-chexiaozhengshu">
    <div class="win-pop1">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>撤销</h3>
        </div>
        <div class="win1-bd">
            <div class="win1-item">
                <div class="tit">撤销原因:</div>
                <div class="con">
                    <textarea class="textarea-inner" placeholder="请输入撤销原因"></textarea>
                </div>
            </div>
        </div>
        <div class="win-bt">
            <a href="javascript:;" class="primary-btn"><span>提交</span></a>
            <a href="javascript:;" class="js-btn"><span>返回</span></a>
        </div>
    </div>
</div>
<!-- 撤销弹窗 end -->
<!-- 禁用弹窗 -->
<div class="m-pop" id="pop-jinyong">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-info"></div>
                <div class="desc">
                    <p>您确定要禁用标识吗？</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 禁用弹窗 end -->
<!-- 启用弹窗 -->
<div class="m-pop" id="pop-qiyong">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-info"></div>
                <div class="desc">
                    <p>您确定要启用标识吗？</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 启用弹窗 end -->
<!-- 下载KeyStore -->
<div class="m-pop" id="pop-xiazaiKeyStore">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="tit">请输入创建人的私钥</div>
                <div class="con">
                    <input type="text" class="input-inner" />
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 下载KeyStore end -->
<!-- 删除 -->
<div class="m-pop" id="pop-shanchu">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-warning"></div>
                <div class="desc">
                    <p>此操作将永久删除该数据, 是否继续?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 删除 end -->
<!-- 删除2 -->
<div class="m-pop" id="pop-shanchu2">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-info"></div>
                <div class="desc">
                    <p>确定删除选中角色?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 删除2 end -->
<!-- 删除3 -->
<div class="m-pop" id="pop-shanchu3">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <!-- <h3>提示</h3> -->
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-warning"></div>
                <div class="desc">
                    <p>确定将选择数据删除?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 删除3 end -->
<!-- 删除4 -->
<div class="m-pop" id="pop-shanchu4">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <!-- <h3>提示</h3> -->
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-warning"></div>
                <div class="desc">
                    <p>确定将选择数据删除?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 删除4 end -->
<!-- 移至黑名单 -->
<div class="m-pop" id="pop-yizhiheimingdan">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-warning"></div>
                <div class="desc">
                    <p>确定将该用户移至黑名单吗?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 移至黑名单 end -->
<!-- 升至管理员 -->
<div class="m-pop" id="pop-shengzhiguanliyuan">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-warning"></div>
                <div class="desc">
                    <p>确定将该用户添加至管理员?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 升至管理员 end -->
<!-- 移除管理员 -->
<div class="m-pop" id="pop-yichuguanliyuan">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>提示</h3>
        </div>
        <div class="win3-bd">
            <div class="win3-item">
                <div class="icon_dn el-icon-info"></div>
                <div class="desc">
                    <p>确定移除该用户管理员?</p>
                </div>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 移除管理员 end -->
<!-- 重置密码 -->
<div class="m-pop" id="pop-chongzhimima">
    <div class="win-pop3">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-icon-close"></i>
                </a>
            </div>
            <h3>请输入接收密码的邮箱</h3>
        </div>
        <div class="win3-bd">
            <div class="form-1 form-4">
                <form action="">
                    <div class="form-item col-1">
                        <div class="tit"></div>
                        <div class="con">
                            <input type="text" class="input-inner" placeholder="">
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="win-bt2">
            <a href="javascript:;" class="js-btn"><span>取消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确定</span></a>
        </div>
    </div>
</div>
<!-- 重置密码 end -->
<!-- 钱包解锁弹窗 -->
<div class="m-pop" id="pop-qianbaojiesuo">
    <div class="win-pop2">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-dialog__close el-icon el-icon-close"></i>
                </a>
            </div>
            <h3>钱包解锁</h3>
        </div>
        <div class="win1-bd">
            <div class="win2-item">
                <div class="tit">请选择方式：</div>
                <div class="con">
                    <ul class="radio-group js-custom-radio-checkbox" data-modulename="formrel01">
                        <li data-selectName=".item-select1">
                            <label>
                                <input type="radio" name="1" checked />
                                <i class="icon"></i>
                                <span>BID keystore 文件</span>
                            </label>
                        </li>
                        <li data-selectName=".item-select2">
                            <label>
                                <input type="radio" name="1" />
                                <i class="icon"></i>
                                <span>BID私钥</span>
                            </label>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="win2-item item-select1">
                <div class="tit">请选择BID Keystore文件</div>
                <div class="con">
                    <div class="file-upload_box3">
                        <div class="fileUpload-btn3">
                            <label>
                                <input type="file" class="js-upload">
                                <span><i class="icon_dn el-icon-upload e-upload"></i>选择文件</span>
                            </label>
                        </div>
                        <ul class="fileUpload-files">
                            <!-- <li>
                            <a href="javascript:;">
                                <i class="el-icon-document"></i>
                                <span>5cd67b13-740e-4f77-b950-09e47e60881d (1).json</span>
                            </a>
                            <i class="el-icon-close"></i>
                        </li> -->
                        </ul>
                    </div>
                </div>
            </div>
            <div class="win2-item col-1 item-select1">
                <div class="tit">请输入密码：</div>
                <div class="con">
                    <div class="input-suffix">
                        <input type="password" class="input-inner" placeholder="请输入密码" />
                        <div class="icon">
                            <i class="el-input__icon i-changetype el-icon-view"></i>
                            <i class="el-input__icon el-icon-circle-close"></i>
                        </div>
                    </div>
                </div>
            </div>
            <div class="win2-item col-1 item-select2">
                <div class="tit">请输入BID私钥：</div>
                <div class="con">
                    <div class="input-suffix">
                        <input type="password" class="input-inner" placeholder="请输入BID私钥" />
                        <div class="icon">
                            <i class="el-input__icon i-changetype el-icon-view"></i>
                            <i class="el-input__icon el-icon-circle-close"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="win-bt win-bt_center">
            <a href="javascript:;" class="js-btn"><span>取 消</span></a>
            <a href="javascript:;" class="primary-btn"><span>确 定</span></a>
        </div>
    </div>
</div>
<!-- 钱包解锁弹窗 end -->
<!-- 显隐 -->
<div class="m-pop" id="pop-xianyin">
    <div class="win-pop5">
        <div class="win1-hd">
            <div class="win1-btn">
                <a href="javascript:;" class="close js-close">
                    <i class="el-dialog__close el-icon el-icon-close"></i>
                </a>
            </div>
            <h3>多 选</h3>
        </div>
        <div class="win1-bd">
            <ul class="checkbox-group2 js-custom-radio-checkbox" data-modulename="formrel01">
                <li>
                    <label>
                        <input type="checkbox" name="1" checked />
                        <i class="icon"></i>
                        <span>角色名称</span>
                    </label>
                </li>
                <li>
                    <label>
                        <input type="checkbox" name="1" />
                        <i class="icon"></i>
                        <span>所属租户</span>
                    </label>
                </li>
                <li>
                    <label>
                        <input type="checkbox" name="1" />
                        <i class="icon"></i>
                        <span>角色别名</span>
                    </label>
                </li>
                <li>
                    <label>
                        <input type="checkbox" name="1" />
                        <i class="icon"></i>
                        <span>角色排序</span>
                    </label>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- 显隐 end -->
<script src="/js/module.js"></script>
<script src="../../js/common/all.js"></script>
<script src="../../js/common/bms.js"></script>
<link rel="stylesheet" href="/js/ztree/zTreeStyle/zTreeStyle.css" />
<script src="/js/ztree/jquery.ztree.all.js"></script>
<script>
    var requestUrl = getRequestUrl();
    var requestUrlUser = getRequestUrlUser();
    var currentPage = 1;
    var currentSize = 10;
    var num = 0;
    var records=[];
    var bladeUser=[];
    var isSelectedAll = false;
    var currentDeptId = '';
    // 刷新
    $('#refresh').click(function(){
        getData()
    })
    // 搜索
    $('#search').click(function () {
        currentPage = 1;
        getData()
    })
    // 清空
    $('#reset').click(function(){
        $('#account').val('');
        $('#realName').val('');
        currentPage = 1;
        getData();
    })
    //角色配置
    $('.role-btn').click(function(){
        var selecteds=[];
        $("input[name='checkbox']:checked").each(function (index, item) {
            console.log("item",$(item).val())
            selecteds.push($(item).val());
        });
        if(selecteds.length == 1){
            $('#pop-yonghujuese').fadeIn("normal");
            $('.pop-bg').addClass('open');
            var roleIds='';
            $.each(records, function(i, item){
                if(item.id === selecteds[0]){
                    roleIds = item.roleId.split(",")
                }
            })
            getRole(roleIds);
        }else if(selecteds.length===0){
            alert("至少选择一条数据");
        }else if(selecteds.length>1){
            alert("只能选择一条数据");
        }

    })

    $("#filter_bladeUser").on("change",function(){
        $.each(bladeUser, function(i, x){
            var val=$("#filter_bladeUser").val();
            console.log("val",x.title.indexOf(val))
            var bladeUserTemp = '';
            if(x.title.indexOf(val) !== -1){
                bladeUserTemp += "<li data-value="+x.value+">" +
                    "<div class='title'>" +
                    "<i class='el-icon-caret-right icon-calendar'></i>" +
                    "<span class='name'>"+x.title+"</span>"+
                    "</div>"+
                    "</li>"
            }
            $('#bladeUser').children().remove();
            if(bladeUserTemp!==""){
                $('#bladeUser').append(bladeUserTemp);
            }else{
                $('#bladeUser').append("<div class='none-data'><p>暂无数据</p></div>");
            }

        })
    })
    // 选择全部
    function selectAll(){
        if(isSelectedAll){
            $("input[name='checkbox']").each(function(i,item){
                item.checked = false
            })
            isSelectedAll = false
        }else{
            $("input[name='checkbox']").each(function(i,item){
                item.checked = true
            })
            isSelectedAll = true
        }
    }
    // 行checkbox选择
    function selectCheckBox(e){
        if($(e).attr("checked")){
            $(e).attr("checked",false).parent().removeClass("formrel01-chk__checked")
        }else{
            $(e).attr("checked",true).parent().addClass("formrel01-chk__checked")
        }
    }
    // 角色配置选择
    function selectRole(e){
        if($(e).attr("checked")){
            $(e).attr("checked",false).parent().removeClass("formrel01-chk__checked")
        }else{
            $(e).attr("checked",true).parent().addClass("formrel01-chk__checked")
        }
    }
    // 左侧树形选择
    function selectedBladeUser(e){
        if($(e).hasClass("on")){
            $(e).removeClass("on")
            currentDeptId = '';
        }else{
            $(e).addClass("on")
            currentDeptId = e.dataset.value;
        }
        getData()

    }
    // 获取列表数据
    function getData(){
        var account = $('#account').val();
        var realName = $('#realName').val();
        var deptId = currentDeptId;
        $request({
            url: requestUrlUser + '/page?current=' + currentPage + '&size=' + currentSize,
            method: 'get',
            data: {
                account: account,
                realName: realName,
                deptId: deptId
            }
        }, function(res) {
            renderRecords(res.records);
            records = res.records
            if(res.total){
                $('#pageable').show()
                $('#total').html("共"+res.total+"条")
                num =Math.ceil(res.total / currentSize);
                pageNumInit(num)
            }else{
                $('#pageable').hide()
            }

        })
    }
    function renderRecords(records){
        console.log(records.length)
        $('#userTbody').children().remove();
        $('#userTbody_left').children().remove();
        $('#userTbody_right').children().remove();

        if(records.length>0){
            var template = '';
            var templateLeft='';
            var templateRight='';
            $.each(records, function(i, x){
                template += "<tr>"+
                    "<td class='table1_hidden'>" +
                    "<div class='checkbox-item'>" +
                    "<label>" +
                    "<input type='checkbox' name='checkbox'/>" +
                    "</label>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" + (i + 1) + "</td>" +
                    "<td>" + x.account + "</td>" +
                    "<td>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.tenantName +  "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td>" + x.realName + "</td>" +
                    "<td>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.roleName + "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.deptName + "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" +
                    "<div class='table1-btn'>" +
                    "<a href='javascript:;' class='myfancy' data-href='#pyonghuguanlichakankan'><i class='icon_dn el-icon-view'></i>查看</a>" +
                    "</div>" +
                    "</td>" +
                    "</tr>"
                // 拼接left节点内容
                templateLeft += "<tr>"+
                    "<td>" +
                    "<div class='checkbox-item'>" +
                    "<label>" +
                    "<input type='checkbox' name='checkbox' value="+x.id+" onclick='selectCheckBox(this)'/>" +
                    "</label>" +
                    "</div>" +
                    "</td>" +
                    "<td>" + (i + 1) + "</td>" +
                    "<td  class='table1_hidden'>" + x.account + "</td>" +
                    "<td  class='table1_hidden'>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.tenantName +  "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" + x.realName + "</td>" +
                    "<td class='table1_hidden'>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.roleName + "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.deptName + "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden table1_center'>" +
                    "<div class='table1-btn'>" +
                    "<a href='javascript:;' class='myfancy' data-href='#pop-yonghuguanlichakan'><i class='icon_dn el-icon-view'></i>查看</a>" +
                    "</div>" +
                    "</td>" +
                    "</tr>"
                // 拼接right节点内容
                templateRight += "<tr>"+
                    "<td class='table1_hidden'>" +
                    "<div class='checkbox-item'>" +
                    "<label>" +
                    "<input type='checkbox' name='checkbox' />" +
                    "</label>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" + (i + 1) + "</td>" +
                    "<td class='table1_hidden'>" + x.account + "</td>" +
                    "<td class='table1_hidden'>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.tenantName +  "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" + x.realName + "</td>" +
                    "<td class='table1_hidden'>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.roleName + "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_hidden'>" +
                    "<div class='table1-tag'>" +
                    "<span>" + x.deptName + "</span>" +
                    "</div>" +
                    "</td>" +
                    "<td class='table1_center'>" +
                    "   <div class='table1-btn'>" +
                    "       <a href='javascript:;' class='myfancy' data-href='#pop-yonghuguanlichakan' onclick='view("+i+",this)'><i class='icon_dn el-icon-view'></i>查看</a>" +
                    "       <a href='javascript:;' class='myfancy' data-href='#pop-yonghuguanlibianji' onclick='edit("+i+",this)'><i class='icon_dn el-icon-edit'></i>编辑</a>" +
                    "   </div>" +
                    "</td>" +
                    "</tr>"
            })
            $('#userTbody').append(template);
            $('#userTbody_left').append(templateLeft);
            $('#userTbody_right').append(templateRight);
        } else {
            $('#userTbody').append('<div class="pic"><img src="/images/none_data.svg" alt="" /></div><p>暂无数据</p>');
        }
    }

    // 查看
    function view(index,e){
        var _id = $(e).attr('data-href');
        $(_id).fadeIn("normal");
        $('.pop-bg').addClass('open');
        var detail = records[Number(index)];
        renderDetail(detail)
        getRole();
        getDeptByTenantId("000000");
        getPostByTenantId("000000");
        getTenant();
    }

    var editObj = {};
    function submitForm(type){
        var account = $('#account_edit').val();
        var tenantId = $("#tenantId_edit option:selected").val();
        var tenantName = $("#tenantId_edit option:selected").text();
        var name = $('#name_edit').val();
        var realName = $('#realName_edit').val();
        var mobile = $('#mobile_edit').val();
        var email = $('#email_edit').val()
        var sex = $("#sex_edit option:selected").val();
        var sexName = $("#sex_edit option:selected").text();
        var birthday = $('#birthday_edit').val()
        var code = $('#code_edit').val();
        var roleId = $("#roleId_edit option:selected").val();
        var roleName = $("#roleId_edit option:selected").text();
        var deptId = $("#deptId_edit").val();
        var deptName = $("#deptName_edit").val();
        var postId = $("#postId_edit option:selected").val();
        var postName = $("#postId_edit option:selected").text();

        if(account == ""){
            alert("请填写登录账号");
            reutrn;
        }
        if(tenantId == ""){
            alert("请选择所属租户");
            reutrn;
        }
        if(name == ""){
            alert("请填写用户昵称");
            return;
        }
        if(realName == ""){
            alert("请填写用户姓名");
            return;
        }
        if(sex == ""){
            alert("请选择性别");
            return;
        }
        if(roleId == ""){
            alert("请选择所属角色");
            return;
        }
        if(postId == ""){
            alert("请选择所属岗位");
            return;
        }
        editObj.account = account;
        editObj.tenantId = tenantId;
        editObj.tenantName = tenantName;
        editObj.name = name;
        editObj.realName = realName;
        editObj.mobile = mobile;
        editObj.email = email;
        editObj.sex = sex;
        editObj.sexName = sexName;
        editObj.birthday = birthday;
        editObj.code = code;
        editObj.roleId = roleId;
        editObj.roleName = roleName;
        editObj.deptId = deptId;
        editObj.deptName = deptName;
        editObj.postId = postId;
        editObj.postName = postName;
        $request({
            url: requestUrlUser + '/update',
            method: 'post',
            data:JSON.stringify(editObj),
        },function(e){
            editObj = {};
            $("#pop-yonghuguanlibianji").fadeOut("normal");
            $('.pop-bg').removeClass('open');
            getData(0);
        })
    }

    // 编辑按钮
    function edit(index,e) {
        var _id = $(e).attr('data-href');
        $(_id).fadeIn("normal");
        $('.pop-bg').addClass('open');
        var detail = records[Number(index)];
        editObj = detail;
        $('#account_edit').val(detail.account)
        $('#name_edit').val(detail.name)
        $('#realName_edit').val(detail.realName)
        $('#mobile_edit').val(detail.mobile)
        $('#email_edit').val(detail.email)
        $('#birthday_edit').val(detail.birthday)
        $('#code_edit').val(detail.code);
        $('#deptName_edit').val(detail.deptId);
        $('#deptId_edit').val(detail.deptId);
        $("#sex_edit").val(detail.sex);
        // 处理角色数据
        getRoleList(detail.roleId);
        // 处理岗位数据
        getPostByTenantIdList(detail.tenantId, detail.postId);
        // 处理所属租户
        getTenantList(detail.tenantId);
    }

    // 获取租户
    function getTenantList(tenantId) {
        $request({
            url: requestUrl + '/tenant/select',
            method: 'get',
        }, function (res) {
            var tenantList = [];
            tenantList.push('<option value="">请选择所属租户</option>');
            $.each(res, function(i, n){
                if(n.tenantId == tenantId){
                    tenantList.push('<option selected value="' + n.tenantId + '">' + n.tenantName + '</option>');
                }else{
                    tenantList.push('<option value="' + n.tenantId + '">' + n.tenantName + '</option>');
                }
            });
            $("#tenantId_edit").html(tenantList.join(""));
        });
    }

    // 获取岗位
    function getPostByTenantIdList(tenantId, postId) {
        $request({
            url: requestUrl + '/post/select?tenantId=' + tenantId,
            method: 'get',
        }, function (res) {
            var postList = [];
            postList.push('<option value="">请选择所属岗位</option>');
            $.each(res, function(i, n){
                if(n.id == postId){
                    postList.push('<option selected value="' + n.id + '">' + n.postName + '</option>');
                }else{
                    postList.push('<option value="' + n.id + '">' + n.postName + '</option>');
                }
            });
            $("#postId_edit").html(postList.join(""));
        })
    }

    // 处理上级选择
    function zTreeOnClick(event, treeId, treeNode) {
        $("#deptId_edit").val(treeNode.id);
        $("#deptName_edit").val(treeNode.name);
    };
    var setting = {
        callback: {
            onClick: zTreeOnClick
        }
    };

    // 获取部门树
    function initDeptTree(type){
        var tenantId = "000000";
        $("#ztreeDiv_" + type + "").show();
        $request({
            url: requestUrl + '/dept/tree?tenantId=' + tenantId,
            method: 'get',
            data: {},
        },function(res){
            var nodes = JSON.stringify(res).replace(/title/g, "name");
            var nodeArr = JSON.parse(nodes);
            zTreeObj = $.fn.zTree.init($("#ztreeDiv_" + type + ""), setting, nodeArr);
        })
    }

    function getRoleList(roleId){
        $request({
            url: requestUrl + '/role/tree',
            method: 'get',
        }, function(res) {
            var roleList = [];
            roleList.push("<option value=''>请选择所属角色</option>");
            $.each(res, function(i, n){
                if(n.value == roleId){
                    roleList.push('<option selected value="' + n.value + '">' + n.title + '</option>');
                }else{
                    roleList.push('<option value="' + n.value + '">' + n.title + '</option>');
                }
            })
            $("#roleId_edit").html(roleList.join(""));
        })
    }


    // 查看回显
    function renderDetail(detail){
        $('#account_view').val(detail.account)
        $('#tenantId_view').val(detail.tenantId)
        $('#tenantName_view').html(detail.tenantName).parent().parent().addClass('doneTit')
        $('#name_view').val(detail.name)
        $('#realName_view').val(detail.realName)
        $('#mobile_view').val(detail.mobile)
        $('#email_view').val(detail.email)
        $('#sex_view').val(detail.sex)
        if(detail.sexName){
            $('#sexName_view').html(detail.sexName).parent().parent().addClass('doneTit')
        }
        $('#birthday_view').val(detail.birthday)
        $('#code_view').val(detail.code)
        $('#roleId_view').val(detail.roleId)
        if(detail.roleName){
            $('#roleName_view').html(detail.roleName).parent().parent().addClass('doneTit')
        }
        $('#depotId_view').val(detail.depotId)
        if(detail.depotName){
            $('#depotName_view').html(detail.depotName).parent().parent().addClass('doneTit')
        }
        $('#postId_view').val(detail.postId)
        if(detail.postName){
            $('#postName_view').html(detail.postName).parent().parent().addClass('doneTit')
        }
    }
    // 分页页码
    function pageNumInit (num) {
        $('#pageList').children().remove();
        if (currentPage === 1 && currentPage !==num) {
            $('#pageList').append(
                "<li class='pages-prev pages-disable'><a href='javascript:;'><i class='el-icon el-icon-arrow-left'></i></a></li>" +
                getPageNum(num) +
                "<li class='pages-next' onclick='changePageSize(" + currentSize + "," + (currentPage + 1) + ",this)'><a href='javascript:;'><i class='el-icon el-icon-arrow-right'></i></a></li>"
            );
        }
        else if (currentPage === num && currentPage !==1) {
            $('#pageList').append(
                "<li class='pages-prev' onclick='changePageSize(" + currentSize + "," + (currentPage - 1) + ",this)'><a href='javascript:;'><i class='el-icon el-icon-arrow-left'></i></a></li>" +
                getPageNum(num) +
                "<li class='pages-next pages-disable'><a href='javascript:;'><i class='el-icon el-icon-arrow-right'></i></a></li>"
            );
        }else if(currentPage===1&&currentPage===num){
            $('#pageList').append(
                "<li class='pages-prev pages-disable'><a href='javascript:;'><i class='el-icon el-icon-arrow-left'></i></a></li>" +
                getPageNum(num) +
                "<li class='pages-next pages-disable'><a href='javascript:;'><i class='el-icon el-icon-arrow-right'></i></a></li>"
            );
        }else {
            $('#pageList').append(
                "<li class='pages-prev' onclick='changePageSize(" + currentSize + "," + (currentPage - 1) + ",this)'><a href='javascript:;'><i class='el-icon el-icon-arrow-left'></i></a></li>" +
                getPageNum(num) +
                "<li class='pages-next' onclick='changePageSize(" + currentSize + "," + (currentPage + 1) + ", this)'><a href='javascript:;'><i class='el-icon el-icon-arrow-right'></i></a></li>"
            );
        }
    }
    // 分页拼接
    function getPageNum (num) {
        var result = '';
        for (var i = 0; i < num; i++) {
            if (i === 0 && num===1) {
                result += "<li class='pages-active' onclick='changeCurrentPage(1,this)'><a href='javascript:;'>1</a></li>";
            }
            else {
                result += "<li class='"+(currentPage===i+1?'pages-active':'')+"' onclick='changeCurrentPage("+(i+1)+",this)'><a href='javascript:;'>" + (i + 1) + "</a></li>";
            }
        }
        return result;
    }
    // 改变每页条数
    function changePageSize (size, pageNo, current) {
        var page = pageNo ? pageNo : $('#pageNum').val() ? $('#pageNum').val() : 1;
        currentSize = size ? size : 10;
        currentPage = Number(page);
        getData();
        pageNumInit(num);
    }
    // 改变页码
    function changeCurrentPage(pageNo,e){
        $(e).addClass("pages-active").siblings().removeClass('pages-active')
        currentPage = Number(pageNo);
        getData();
    }
    // 手动跳转到某页
    function jumpPage(){
        var pageNo = $('#pageNum').val() ? $('#pageNum').val() : currentPage
        currentPage = Number(pageNo);
        getData();
    }
    //
    function getBladeUser(parentId){
        $request({
            url: requestUrl + '/dept/lazy-tree?parentId=' + parentId,
            method: 'get',
        }, function(res) {
            var bladeUserTemp='';
            bladeUser = res
            if(res.length>0){
                $.each(res, function(i, x){
                    bladeUserTemp += "<li data-value="+x.value+">" +
                        "<div class='title' data-value="+x.value+" onclick='selectedBladeUser(this)'>" +
                        "<i class='el-icon-caret-right icon-calendar'></i>" +
                        "<span class='name'>"+x.title+"</span>"+
                        "</div>"+
                        "</li>"
                })
            }
            $('#bladeUser').append(bladeUserTemp);
        })
    }
    // 获取部门树
    function getDeptByTenantId(tenantId){
        $request({
            url: requestUrl + '/dept/tree?tenantId=' + tenantId,
            method: 'get',
        }, function(res) {
            var deptTemp='';
            if(res.length>0){
                $.each(res, function(i, x){
                    deptTemp += "<li data-value="+x.value+">" +
                        "<div class='title'>" +
                        "<i class='el-icon-caret-right icon-calendar'></i>" +
                        "<div class='checkbox-item'>" +
                        "<label>" +
                        "<input type='checkbox' name='checkbox'>" +
                        "</label>" +
                        "</div>" +
                        "<span class='name'>"+x.title+"</span>" +
                        "</div>" +
                        "</li>"
                })
            }
            $('#deptTree').children().remove();
            $('#deptTree').append(deptTemp);
        })
    }
    // 获取岗位
    function getPostByTenantId(tenantId){
        $request({
            url: requestUrl + '/post/select?tenantId=' + tenantId,
            method: 'get',
        }, function(res) {
            var postTemp='';
            if(res.length>0){
                $.each(res, function(i, x){
                    postTemp += "<li data-value="+x.value+">" +
                        "<div class='title'>" +
                        "<i class='el-icon-caret-right icon-calendar'></i>" +
                        "<div class='checkbox-item'>" +
                        "<label>" +
                        "<input type='checkbox' name='checkbox'>" +
                        "</label>" +
                        "</div>" +
                        "<span class='name'>"+x.title+"</span>" +
                        "</div>" +
                        "</li>"
                })
            }
            $('#postTree').children().remove();
            $('#postTree').append(postTemp);
        })
    }
    // 获取角色
    function getRole(roleIds){
        $request({
            url: requestUrl + '/role/tree',
            method: 'get',
        }, function(res) {
            var roleTemp='';
            if(res.length>0){
                $.each(res, function(i, x){
                    roleTemp += "<li data-value="+x.value+">" +
                        "<div class='title'>" +
                        "<i class='el-icon-caret-right icon-calendar'></i>" +
                        "<div class='checkbox-item'>" +
                        "<label>" +
                        "<input type='checkbox' name='rolecheckbox' value="+x.value+" onclick='selectRole(this)'>" +
                        "</label>" +
                        "</div>" +
                        "<span class='name'>"+x.title+"</span>" +
                        "</div>" +
                        "</li>"
                })
            }

            if(roleIds){
                $('#roleTree').children().remove();
                $('#roleTree').append(roleTemp);
                $.each(roleIds, function(i, item){
                    $("input[name='rolecheckbox'][value="+item+"]").attr("checked",true).parent().addClass('formrel01-chk__checked')
                })
            }else{
                $('#roleTree_view').children().remove();
                $('#roleTree_view').append(roleTemp);
            }
        })
    }
    // 获取租户
    function getTenant(){
        $request({
            url: requestUrl + '/tenant/select',
            method: 'get',
        }, function(res) {
            var tenantTemp='';
            if(res.length>0){
                $.each(res, function(i, x){
                    tenantTemp += "<li data-value="+x.tenantId+">"+x.tenantName+"</li>"
                })
            }
            $('#tenantSelect').children().remove();
            $('#tenantSelect').append(tenantTemp);
        })
    }
    //角色配置提交
    function submitGrant(){
        var roleIds=[];
        var userIds=[];
        $("input[name='rolecheckbox']:checked").each(function (index, item) {
            roleIds.push($(item).val())
        });
        $("input[name='checkbox']:checked").each(function (index, item) {
            console.log("item",$(item).val())
            userIds.push($(item).val());
        });
        if(roleIds.length > 1){
            alert("只能拥有一个角色");
            return;
        }
        $request({
            url: requestUrlUser + '/grant',
            method: 'post',
            data:{
                roleIds:roleIds.join(),
                userIds:userIds.join()
            },
            contentType: 'application/x-www-form-urlencoded;charset=UTF-8'
        }, function(res) {
            $('#pop-yonghujuese').fadeOut("normal");
            $('.pop-bg').removeClass('open');
            getData();
        })
    }
    getData();
    getBladeUser(0);
</script>

</body>

</html>